package com.shop.domain.user;

import java.util.Date;
import java.math.BigDecimal;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.*;
import javax.persistence.Table;
import com.alibaba.fastjson.annotation.JSONField;
import com.shop.jpa.domain.BaseDomain;
import com.shop.jpa.support.JpaConst;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import lombok.Data;

/**
 * <p>UserExtract 实体类</p>
 * <p>Table: t_user_extract - 用户提现表</p>
 * @author generator
 * @date 2021-02-28 11:02:10
 */
@ApiModel("UserExtract 实体类")
@Data
@Entity
@EntityListeners(AuditingEntityListener.class)
@Table(name = "t_user_extract")
@SQLDelete(sql = "update t_user_extract set is_deleted = 1 where id = ?")
@Where(clause = JpaConst.WHERE_CLAUSE_NOT_DELETED)
@DynamicInsert(true)
@DynamicUpdate(true)
public class UserExtract extends BaseDomain implements Serializable {

    @ApiModelProperty(value = "id", hidden = true)
	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
	@JSONField(serialize=false)
    private Long id;

    /**
	 * 
	 */
    @ApiModelProperty("用户id")
	@Column(name = "user_id")
    @JSONField(serialize=false)
    private Long uid;


    /**
     *
     */
    @ApiModelProperty("关联提现模版id")
    @Column(name = "bankcard_id")
    private Long bankcardId;

    /**
     * 账号
     */
    @Column(name = "account")
    @ApiModelProperty("账号")
    private String account;

    /**
     * 银行预留手机
     */
    @Column(name = "bank_reserve_tel")
    @ApiModelProperty("银行预留手机")
    private String bankReserveTel;


    /**
     * 卡类型
     */
    @Column(name = "card_type")
    @ApiModelProperty("卡类型 alipay bank")
    private String cardType;


    /**
     * 账号
     */
    @Column(name = "alipay_img")
    @ApiModelProperty("支付宝提现收款码")
    private String alipayImg;



    /**
     * 姓名
     */
    @Column(name = "realname")
    @ApiModelProperty("姓名")
    private String realname;


    /**
     * 身份证号码
     */
    @Column(name = "idnumber")
    @ApiModelProperty("身份证号码")
    private String idnumber;


    /**
	 * 提现金额
	 */
    @ApiModelProperty("提现金额")
	@Column(name = "extract_price")
    private BigDecimal extractPrice;

    /**
	 * 原始金额
	 */
    @ApiModelProperty("原始金额")
	@Column(name = "less_integral")
    private BigDecimal lessIntegral;

    /**
	 * 无效原因
	 */
    @ApiModelProperty("无效原因")
	@Column(name = "fail_msg")
    private String failMsg;

    /**
	 * 创建时间
	 */
    @ApiModelProperty("创建时间")
	@Column(name = "fail_time")
    private Date failTime;

    /**
	 * -1 未通过 0 审核中 1 已提现
	 */
    @ApiModelProperty("-1 未通过 0 审核中 1 已提现")
	@Column(name = "status")
    private Integer status;

    /**
	 * 0未知提现类型1余额 2佣金 3 TG
	 */
    @ApiModelProperty("0未知提现类型  2 返佣积分 4 签到积分")
	@Column(name = "type")
    private Integer type;

    /**
	 * 提现手续费
	 */
    @ApiModelProperty("提现手续费")
	@Column(name = "tixian_fee")
    private BigDecimal tixianFee;

    /**
	 * 订单号
	 */
    @ApiModelProperty("订单号")
	@Column(name = "order_sn")
    private String orderSn;

    /**
	 * 创建时间
	 */
    @ApiModelProperty("创建时间")
	@Column(name = "create_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
	 * 修改时间
	 */
    @ApiModelProperty("修改时间")
	@Column(name = "update_time")
    @JSONField(serialize=false)
    private Date updateTime;

    /**
	 * 是否删除
	 */
    @ApiModelProperty("是否删除")
	@Column(name = "is_deleted")
    @JSONField(serialize=false)
    private Integer isDeleted;
}